home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 033a / sendcom_.zip / MISC.CPP < prev    next >
C/C++ Source or Header  |  1991-10-14  |  804b  |  32 lines

  1. #include <iostream.h>
  2. #include "misc.h"
  3.  
  4. //::::::::::::::::::::::[ PCBSYS MISC ROUTINES ]::::::::::::::::::::::::::::
  5.  
  6. // IDENTICAL TO strncpy() EXCEPT PADS WITH SPACE VERSUS NULL
  7. void place_str(char *dest,char *source,int maxlen){
  8.         while(  (*source!='\0') && (maxlen!=0) ){
  9.                 *dest=*source;
  10.                 dest++;
  11.                 source++;
  12.                 maxlen--;
  13.         }
  14.         while(maxlen-->0){
  15.                 *dest=' ';
  16.                 dest++;
  17.         }
  18. }
  19.  
  20.  
  21. // DRAW TOP OR BOTTOM DOUBLE LINE WITH CORNERS  (TOP DEFINED IN MISC.HPP)
  22. //
  23. void draw_dline(int len,int mode){
  24.         char box[2][2]={{DBL,DTL},{DBR,DTR}};
  25.         cout << box[0][mode];
  26.         for(int i=0;i<len;i++)
  27.                 cout << DHM;
  28.         cout << box[1][mode];
  29. }
  30.  
  31.  
  32.